using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using Konst3d.Efficiency.Suite;

namespace PEM
{
    /// <summary>
    /// Interaction logic for CreateEditNoteDialog.xaml
    /// </summary>
    public partial class CreateEditNoteDialog : PersistentModalDialog
    {
        public string NoteTitle
        {
            get
            {
                return uiNoteTitleTextBox.Text;
            }
        }

        public string NoteText
        {
            get
            {
                return uiNoteTextBox.Text;
            }
        }

        public CreateEditNoteDialog()
        {
            InitializeComponent();
        }

        public bool ShowDialog(Window owner, INote note)
        {
            uiNoteTitleTextBox.Text = note.Title;
            uiNoteTextBox.Text = note.Text;

            return ShowDialog(owner);
        }

        private void OnCreateButtonClick(object sender, RoutedEventArgs e)
        {
            DialogResult = true;
        }

        private void OnCancelButtonClick(object sender, RoutedEventArgs e)
        {
            DialogResult = false;
        }
    }
}
